<!doctype html>
<html>
  <head lang="zh-CN">
    <meta charset="UTF-8">
    <meta name="renderer" content="webkit">
    <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no">
    <link rel="shortcut icon" href="https://ssl.captcha.qq.com/favicon.ico">
    <title>验证码</title>
  </head>
  <body>
    <div id="cap_iframe" style="width: 230px; height: 220px"></div>
    <script{{if script}}>{{@script}}{{else}} src="{{url}}">{{/if}}</script>
    <script>
      function callback(e) {
        fetch(window.location.href, {
          method: 'POST',
          headers: { 'Content-Type': 'application/json' },
          body: JSON.stringify(e)
        })
        // alert('\u63d0\u4ea4\u6210\u529f\uff01')
        alert('\u9a8c\u8bc1\u5b8c\u6210\uff01\u63d0\u4ea4\u7ed3\u679c\u5982\u4e0b\uff1a\u000a' + JSON.stringify(e))
      };
      {{if url.includes('TCaptcha.js')}}
      window.onload = function() {
        const elem = document.getElementById("cap_iframe");
        const aid = '2055428399';
        const captcha = new TencentCaptcha(elem, aid, callback, { showHeader: 0 });
        captcha.show()
      }
      {{else}}
      window.onload = capInit(document.getElementById("cap_iframe"), { showHeader: 0, callback })
      {{/if}}
    </script>
  </body>
</html>